/*
 * Copyright Radosław Smogura, 2012. All rights reserved.
 *
 * The content of this file is confidential and it is intelectual property
 * of copyright owners.
 * 
 *
 * $URL: http://reprap-ide.googlecode.com/svn/trunk/RepRapIDE/RepRapProject/src/main/java/eu/softper/reprap/project/nodes/SourcesNodeFactory.java $
 * $Id: SourcesNodeFactory.java 3 2012-11-19 10:58:30Z mail@smogura.eu $
 * $Revision: 3 $
 */
package eu.softper.reprap.project.nodes;

import eu.softper.reprap.project.RepRapProject;
import eu.softper.reprap.project.api.RepRapProjectConst;
import org.netbeans.api.project.Project;
import org.netbeans.spi.project.ui.support.NodeFactory;
import org.netbeans.spi.project.ui.support.NodeFactorySupport;
import org.netbeans.spi.project.ui.support.NodeList;

/**
 *
 * @author rsmogura
 */
@NodeFactory.Registration(projectType=RepRapProjectConst.PROJECT_TYPE, position=1000)
public class SourcesNodeFactory implements NodeFactory{

    @Override
    public NodeList<?> createNodes(Project p) {
        RepRapProject repRapProject = p.getLookup().lookup(RepRapProject.class);
        return NodeFactorySupport.fixedNodeList(SourcesDirectoryNode.createFolderNode(repRapProject, repRapProject.getSourcesDirectory().getNodeDelegate()));
    }
    
}
